Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Selecting a Video Output Component

Listing 1 shows how to assemble a list of available video output components using the FindNextComponent function. This list can then be presented to the user.

The base video output component is a special component that provides services to other video output components. It is never connected to a display, and it has a component flag, kQTVideoOutputDontDisplayToUser , that indicates that it should not be included in a list of available video output components. The sample code shows how to check for this flag.

Listing 1 Displaying available video output components

ComponentDescription cd;
Component c = 0;

cd.componentType = QTVideoOutputComponentType;
cd.componentSubType = 0;
cd.componentManufacturer = 0;
cd.componentFlags = 0;
cd.componentFlagsMask = kQTVideoOutputDontDisplayToUser;

while (c = FindNextComponent (c, &cd)) {
    Handle nameHandle = NewHandle (0);

    GetComponentInfo (c, &cd, nameHandle, nil, nil);

    // add name to list

    DisposeHandle (nameHandle);
}

© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |